import request from '@/utils/request'
export default {
  listAll() {
    return request({
      url: `/admin/core/menu/list`,
      method: 'get'
    })
  },

  listUpMenus() {
    return request({
      url: '/admin/core/menu/upMenus',
      method: 'get'
    })
  },

  saveOrUpdate(data) {
    return request({
      url: '/admin/core/menu/saveOrUpdate',
      method: 'post',
      data: data
    })
  },

  listById(id) {
    return request({
      url: `/admin/core/menu/info/${id}`,
      method: 'get'
    })
  },

  removeById(id) {
    return request({
        url: `/admin/core/menu/remove/${id}`,
        method: 'post'
    })
  }
}